package com.linsir;

import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Iterator;

/**
 * @ProjectName:linsir-lin
 * @Package:com.linsir
 * @Title: LinWebApplication2
 * @Description: TODO
 * @Create:2021/6/26 9:49 by @author:Linsir
 * @Update:2021/6/26 9:49 by @author:Linsir
 * @UpdateRemark: 初始创建
 * @Version 1.0.0
 */
@SpringBootApplication
@EnableProcessApplication
public class LinWebApplication
{
    public static void main( String[] args )
    {

        SpringApplication springApplication =new SpringApplication(LinWebApplication.class);

        ConfigurableApplicationContext configurableApplicationContext= springApplication.run(args);


        //SpringApplication.run(LinWebApplication.class);

        ConfigurableListableBeanFactory configurableListableBeanFactory = configurableApplicationContext.getBeanFactory();

        Iterator<String> beans=  configurableListableBeanFactory.getBeanNamesIterator();

        for (Iterator<String> it = beans; it.hasNext(); ) {
            String bean = it.next();

            System.out.println(bean);
        }
    }
}
